import os
import pkgutil
from importlib import import_module

command_dir = os.path.join(".",'commands')
print command_dir

commands = [name for tmp,name, is_pkg in pkgutil.iter_modules([command_dir])
 if not is_pkg and not name.startswith('_')]
print commands    

for cmd in commands:
    module = import_module('%s.%s' % ("commands", cmd))
    cmd = module.Command()
    cmd.execute()
